Skip to content

Use Prism::ParseResult#continuable? if possible#1184

Merged
tompng merged 1 commit intoruby:masterfrom
tompng:prism_termination_check
Mar 15, 2026
Merged

Use Prism::ParseResult#continuable? if possible#1184
tompng merged 1 commit intoruby:masterfrom
tompng:prism_termination_check

Conversation

@tompng
Copy link
Member

@tompng tompng commented Mar 14, 2026

Prism-head have Prism::ParseResult#continuable? ruby/prism#3530 ruby/prism#3954 (It's not released yet though)

RubyLex#check_code_state will use this new API to classify syntax errors.
When using older Prism, IRB::RubyLex fallbacks to the legacy error message based heuristics. This heuristic was fragile but since we're only using it in Prism <= 1.9.0, error message won't change in the future.

@tompng tompng force-pushed the prism_termination_check branch from 65c31c6 to 70d548c Compare March 15, 2026 19:14
@tompng tompng merged commit 7a7f75f into ruby:master Mar 15, 2026
40 checks passed
@tompng tompng deleted the prism_termination_check branch March 15, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants